(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
minus(n__0, Y) → 0
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
geq(X, n__0) → true
geq(n__0, n__s(Y)) → false
geq(n__s(X), n__s(Y)) → geq(activate(X), activate(Y))
div(0, n__s(Y)) → 0
div(s(X), n__s(Y)) → if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
0 → n__0
s(X) → n__s(X)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X
Rewrite Strategy: INNERMOST
(1) DependencyGraphProof (BOTH BOUNDS(ID, ID) transformation)
The following rules are not reachable from basic terms in the dependency graph and can be removed:
div(0, n__s(Y)) → 0
div(s(X), n__s(Y)) → if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
(2) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
minus(n__0, Y) → 0
activate(n__0) → 0
geq(X, n__0) → true
if(false, X, Y) → activate(Y)
0 → n__0
if(true, X, Y) → activate(X)
s(X) → n__s(X)
activate(X) → X
activate(n__s(X)) → s(X)
geq(n__s(X), n__s(Y)) → geq(activate(X), activate(Y))
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
geq(n__0, n__s(Y)) → false
Rewrite Strategy: INNERMOST
(3) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)
A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 4.
The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5, 6]
transitions:
n__00() → 0
true0() → 0
false0() → 0
n__s0(0) → 0
minus0(0, 0) → 1
activate0(0) → 2
geq0(0, 0) → 3
if0(0, 0, 0) → 4
00() → 5
s0(0) → 6
01() → 1
01() → 2
true1() → 3
activate1(0) → 4
n__01() → 5
n__s1(0) → 6
s1(0) → 2
activate1(0) → 7
activate1(0) → 8
geq1(7, 8) → 3
activate1(0) → 9
activate1(0) → 10
minus1(9, 10) → 1
false1() → 3
01() → 4
01() → 7
01() → 8
01() → 9
01() → 10
n__02() → 1
n__02() → 2
n__s2(0) → 2
s1(0) → 4
s1(0) → 7
s1(0) → 8
s1(0) → 9
s1(0) → 10
n__02() → 4
n__02() → 7
n__02() → 8
n__02() → 9
n__02() → 10
n__s2(0) → 4
n__s2(0) → 7
n__s2(0) → 8
n__s2(0) → 9
n__s2(0) → 10
02() → 1
true2() → 3
activate2(0) → 11
activate2(0) → 12
geq2(11, 12) → 3
activate2(0) → 13
activate2(0) → 14
minus2(13, 14) → 1
false2() → 3
01() → 11
01() → 12
01() → 13
01() → 14
n__03() → 1
s1(0) → 11
s1(0) → 12
s1(0) → 13
s1(0) → 14
n__02() → 11
n__02() → 12
n__02() → 13
n__02() → 14
n__s2(0) → 11
n__s2(0) → 12
n__s2(0) → 13
n__s2(0) → 14
03() → 1
true3() → 3
activate3(0) → 15
activate3(0) → 16
geq3(15, 16) → 3
activate3(0) → 17
activate3(0) → 18
minus3(17, 18) → 1
false3() → 3
01() → 15
01() → 16
01() → 17
01() → 18
n__04() → 1
s1(0) → 15
s1(0) → 16
s1(0) → 17
s1(0) → 18
n__02() → 15
n__02() → 16
n__02() → 17
n__02() → 18
n__s2(0) → 15
n__s2(0) → 16
n__s2(0) → 17
n__s2(0) → 18
0 → 2
0 → 4
0 → 7
0 → 8
0 → 9
0 → 10
0 → 11
0 → 12
0 → 13
0 → 14
0 → 15
0 → 16
0 → 17
0 → 18
(4) BOUNDS(1, n^1)
(5) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
activate(n__0) → 0
activate(z0) → z0
activate(n__s(z0)) → s(z0)
geq(z0, n__0) → true
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
geq(n__0, n__s(z0)) → false
if(false, z0, z1) → activate(z1)
if(true, z0, z1) → activate(z0)
0 → n__0
s(z0) → n__s(z0)
Tuples:
MINUS(n__0, z0) → c(0')
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__0) → c2(0')
ACTIVATE(z0) → c3
ACTIVATE(n__s(z0)) → c4(S(z0))
GEQ(z0, n__0) → c5
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(n__0, n__s(z0)) → c7
IF(false, z0, z1) → c8(ACTIVATE(z1))
IF(true, z0, z1) → c9(ACTIVATE(z0))
0' → c10
S(z0) → c11
S tuples:
MINUS(n__0, z0) → c(0')
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__0) → c2(0')
ACTIVATE(z0) → c3
ACTIVATE(n__s(z0)) → c4(S(z0))
GEQ(z0, n__0) → c5
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(n__0, n__s(z0)) → c7
IF(false, z0, z1) → c8(ACTIVATE(z1))
IF(true, z0, z1) → c9(ACTIVATE(z0))
0' → c10
S(z0) → c11
K tuples:none
Defined Rule Symbols:
minus, activate, geq, if, 0, s
Defined Pair Symbols:
MINUS, ACTIVATE, GEQ, IF, 0', S
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11
(7) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 10 trailing nodes:
IF(true, z0, z1) → c9(ACTIVATE(z0))
IF(false, z0, z1) → c8(ACTIVATE(z1))
ACTIVATE(z0) → c3
0' → c10
S(z0) → c11
GEQ(n__0, n__s(z0)) → c7
MINUS(n__0, z0) → c(0')
ACTIVATE(n__s(z0)) → c4(S(z0))
ACTIVATE(n__0) → c2(0')
GEQ(z0, n__0) → c5
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
activate(n__0) → 0
activate(z0) → z0
activate(n__s(z0)) → s(z0)
geq(z0, n__0) → true
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
geq(n__0, n__s(z0)) → false
if(false, z0, z1) → activate(z1)
if(true, z0, z1) → activate(z0)
0 → n__0
s(z0) → n__s(z0)
Tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
S tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
K tuples:none
Defined Rule Symbols:
minus, activate, geq, if, 0, s
Defined Pair Symbols:
MINUS, GEQ
Compound Symbols:
c1, c6
(9) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 4 trailing tuple parts
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
activate(n__0) → 0
activate(z0) → z0
activate(n__s(z0)) → s(z0)
geq(z0, n__0) → true
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
geq(n__0, n__s(z0)) → false
if(false, z0, z1) → activate(z1)
if(true, z0, z1) → activate(z0)
0 → n__0
s(z0) → n__s(z0)
Tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
S tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
K tuples:none
Defined Rule Symbols:
minus, activate, geq, if, 0, s
Defined Pair Symbols:
MINUS, GEQ
Compound Symbols:
c1, c6
(11) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
geq(z0, n__0) → true
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
geq(n__0, n__s(z0)) → false
if(false, z0, z1) → activate(z1)
if(true, z0, z1) → activate(z0)
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
activate(n__0) → 0
activate(z0) → z0
activate(n__s(z0)) → s(z0)
0 → n__0
s(z0) → n__s(z0)
Tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
S tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
K tuples:none
Defined Rule Symbols:
activate, 0, s
Defined Pair Symbols:
MINUS, GEQ
Compound Symbols:
c1, c6
(13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
We considered the (Usable) Rules:
activate(n__0) → 0
0 → n__0
activate(z0) → z0
s(z0) → n__s(z0)
activate(n__s(z0)) → s(z0)
And the Tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(GEQ(x1, x2)) = [2]x2 + [2]x22
POL(MINUS(x1, x2)) = 0
POL(activate(x1)) = x1
POL(c1(x1)) = x1
POL(c6(x1)) = x1
POL(n__0) = 0
POL(n__s(x1)) = [2] + x1
POL(s(x1)) = [2] + x1
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
activate(n__0) → 0
activate(z0) → z0
activate(n__s(z0)) → s(z0)
0 → n__0
s(z0) → n__s(z0)
Tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
S tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
K tuples:
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
Defined Rule Symbols:
activate, 0, s
Defined Pair Symbols:
MINUS, GEQ
Compound Symbols:
c1, c6
(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
We considered the (Usable) Rules:
activate(n__0) → 0
0 → n__0
activate(z0) → z0
s(z0) → n__s(z0)
activate(n__s(z0)) → s(z0)
And the Tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(GEQ(x1, x2)) = 0
POL(MINUS(x1, x2)) = x1
POL(activate(x1)) = x1
POL(c1(x1)) = x1
POL(c6(x1)) = x1
POL(n__0) = 0
POL(n__s(x1)) = [1] + x1
POL(s(x1)) = [1] + x1
(16) Obligation:
Complexity Dependency Tuples Problem
Rules:
activate(n__0) → 0
activate(z0) → z0
activate(n__s(z0)) → s(z0)
0 → n__0
s(z0) → n__s(z0)
Tuples:
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
S tuples:none
K tuples:
GEQ(n__s(z0), n__s(z1)) → c6(GEQ(activate(z0), activate(z1)))
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
Defined Rule Symbols:
activate, 0, s
Defined Pair Symbols:
MINUS, GEQ
Compound Symbols:
c1, c6
(17) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(18) BOUNDS(1, 1)